package com.ruoyi.qymlxin.esspringboot;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;

/**
 * 定义ES索引book对应的Java实体类
 *
 * @author geng
 * 2020/12/18
 */
@Data
@Document(indexName = "test",type = "shop")
public class ESBook {
    @Id
    @Field(type = FieldType.Text)
    private String id;
    @Field(type = FieldType.Text)
    private String imgurl;
    @Field(analyzer = "ik_max_word")
    private String type;
    @Field(analyzer = "ik_max_word")
    private String title;
    @Field(analyzer = "ik_max_word")
    private String des;
    @Field(analyzer = "ik_max_word")
    private BigDecimal price;
    @Field(type = FieldType.Long)
    private Long num;
    @Field(analyzer = "ik_max_word")
    private String additional;
    @Field(type = FieldType.Text)
    private String specifications;
    @Field(type = FieldType.Text)
    private String shopid;
}

